<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内置指令</title>
</head>
<body>
<div id="example">
    <p v-text="url"></p>
    <p v-html="url"></p>
    <img :id="myid" :src="imageSrc">
    <p><span ref="message">atguigu.com</span>
        <button @click="showMsg">显示左侧文本</button>
    </p>
    <p>{{url}}</p>
</div>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript">
    alert("hahah")
    new Vue({
        el: '#example',
        data: {
            url: '<a href="http://www.atguigu.com">尚硅谷</a>',
            myid: 'abc123',
            imageSrc: 'http://cn.vuejs.org/images/logo.png'
        },
        methods: {
            showMsg() {
                alert(this.$refs.message)
            }
        }
    })
</script>
</body>
</html>